\subsection{Limits and completions}
\begin{definition}
    Let \( \mathcal C \) be a category.
    \begin{enumerate}
        \item A \emph{directed set} \( (I, \leq) \) is a partially ordered set such that for all \( a, b \in I \), there exists \( c \in I \) such that \( a, b \leq c \).
        \item A \emph{direct system} on a directed set \( (I, \leq) \) is a pair \( ((X_i)_{i \in I}, (f_{ij})_{i \leq j}) \) where \( X_i \in \ob \mathcal C \) and \( f_{ij} : X_i \to X_j \), such that \( f_{ii} = 1_{X_i} \) and \( f_{ik} = f_{jk} \circ f_{ij} \).
        \item An \emph{inverse system} on \( (I, \leq) \) is a pair \( ((Y_i)_{i \in I}, (h_{ij})_{i \leq j}) \) where \( Y_i \in \ob \mathcal C \) and \( h_{ij} : Y_j \to Y_i \), such that \( h_{ii} = 1_{X_i} \) and \( h_{ik} = h_{ij} \circ h_{jk} \).
    \end{enumerate}
\end{definition}
\begin{remark}
    An inverse system in \( \mathcal C \) is the same as a direct system in \( \mathcal C^\cop \).
\end{remark}
\begin{example}
    Let \( I = (\mathbb N, \leq) \).
    \begin{enumerate}
        \item Let \( p \) be a prime, and let \( X_i = \mathbb F_{p^{i!}} \).
        Recall that if \( a \mid b \), then there is an embedding \( \varphi : \mathbb F_{p^a} \to \mathbb F_{p^b} \).
        The collection of embeddings \( \mathbb F_{p^a} \to \mathbb F_{p^b} \) is then given by \( x \mapsto (\varphi(x))^{p^c} \) where \( 0 \leq c < a - 1 \).
        The map \( f_{i(i+1)} : \mathbb F_{p^{i!}} \to \mathbb F_{p^{(i+1)!}} \) is defined to be one such embedding.
        A general embedding \( f_{ij} \) is given by the composite \( f_{(j-1)j} \circ \cdots \circ f_{i(i+1)} \).
        This creates a direct system on \( I \).
        \item Let \( Y_i = \faktor{\mathbb Z}{p^i \mathbb Z} \), and let \( h_{ij} : \faktor{\mathbb Z}{p^j \mathbb Z} \to \faktor{\mathbb Z}{p^i \mathbb Z} \) be the natural projection.
        This is an inverse system on \( I \).
    \end{enumerate}
\end{example}
\begin{definition}
    Let \( (I, \leq) \) be a directed set.
    \begin{enumerate}
        \item Let \( D = ((X_i)_{i \in I}, (f_{ij})_{i \leq j}) \) be a direct system on \( I \).
        Then the \emph{direct limit} of \( D \) is
        \[ \varinjlim X_i = \faktor{\qty(\coprod_{i \in I} X_i)}{\sim} \]
        where for \( x_i \in X_i \) and \( x_j \in X_j \),
        \[ x_i \sim x_j \iff \exists k \geq i, j,\, f_{ik} (x_i) = f_{jk} (x_j) \]
        Equivalently, one can define \( \sim \) to be the smallest equivalence relation containing \( x_i \sim f_{ij}(x_i) \).
        \item Let \( E = ((Y_i)_{i \in I}, (h_{ij})_{i \leq j}) \) be an inverse system on \( I \).
        Then the \emph{inverse limit} of \( E \) is
        \[ \varprojlim Y_i = \qty{\vb y \in \prod_{X_i} \midd \forall i \leq j,\, y_i = h_{ij}(y_j)} \]
    \end{enumerate}
\end{definition}
\begin{example}
    \begin{enumerate}
        \item \( \mathbb F_p^{\mathrm{alg}} = \varinjlim \mathbb F_{p^{i!}} \) is an algebraic closure of \( \mathbb F_p \).
        First, \( \mathbb F_p^{\mathrm{alg}} \) is algebraic over \( \mathbb F_p \).
        Indeed, for \( [x] \in \mathbb F_p^{\mathrm{alg}} \), we have \( x \in \mathbb F_p^{i!} \) for some \( i \geq 1 \).
        Then \( x^{p^{i!}} - x = 0 \).
        Hence
        \[ [x]^{p^{i!}} - [x] = [x^{p^{i!}} - x] = [0] \]
        Further, \( \mathbb F_p^{\mathrm{alg}} \) is algebraically closed.
        Any polynomial \( h \in \mathbb F_p^{\mathrm{alg}}[T] \) has coefficients in \( \mathbb F_p^{\mathrm{alg}} \), so in particular \( h \) arises from an element of \( \mathbb F_{p^{i!}}[T] \) for some \( i \).
        This element splits under some \( \mathbb F_{p^{i!}} \to \mathbb F_{p^\ell} \), so it splits under some \( \mathbb F_{p^{i!}} \to \mathbb F_{p^{\ell!}} \).
        Hence it splits under \( h_{ij} : \mathbb F_{p^{i!}} \to \mathbb F_{p^{j!}} \), so \( h \) splits in the direct limit \( \mathbb F_p^{\mathrm{alg}} \).
        \item Define \( \mathbb Z_p = \varprojlim \faktor{\mathbb Z}{p^i \mathbb Z} \).
        This is the ring of \emph{\( p \)-adic integers}.
        For example, writing numbers in base \( p = 5 \),
        \begin{align*}
            1 &= (1 + 5^1 \mathbb Z, 1 + 5^2 \mathbb Z, 1 + 5^3 \mathbb Z, \dots) \\
            -1 &= (4 + 5^1 \mathbb Z, 44 + 5^2 \mathbb Z, 444 + 5^3 \mathbb Z, \dots) \\
        \end{align*}
        In every position in such an expansion, we `expose' another digit of the \( p \)-adic integer to the left.
    \end{enumerate}
\end{example}
\begin{definition}
    Let \( R \) be a ring, and let \( \mathfrak a \) be an ideal of \( R \).
    Then the \emph{\( \mathfrak a \)-adic completion} of \( R \) is
    \[ \hat R = \varprojlim \faktor{R}{\mathfrak a^i} \]
    where the inverse limit is taken over the directed system \( (\mathbb N, \leq) \) with morphisms given by the natural projections.
\end{definition}
\begin{example}
    \begin{enumerate}
        \item If \( R = \mathbb Z \) and \( \mathfrak a = (p) \), then \( \hat R = \mathbb Z_p \).
        \item If \( R = k[T] \) and \( \mathfrak a = (T) \), then
        \[ \hat R = \varprojlim \faktor{k[T]}{(T^i)} = k\Brackets{t} \]
    \end{enumerate}
\end{example}
\begin{definition}
    Let \( M \) be an \( R \)-module, and let \( \mathfrak a \) be an ideal of \( R \).
    Then the \emph{\( \mathfrak a \)-adic completion} of \( M \) is
    \[ \hat M = \varprojlim \faktor{M}{\mathfrak a^i M} \]
    which is naturally an \( \hat R \)-module.
\end{definition}
We can make the following more general definition.
\begin{definition}
    Let \( M \) be an \( R \)-module.
    \begin{enumerate}
        \item A \emph{filtration} of \( M \) is a sequence \( (M_n)_{n \geq 1} \) of submodules of \( M \) such that \( M_0 = M \) and \( M_n \supseteq M_{n+1} \) for each \( n \).
        \item The \emph{completion} of \( M \) with respect to a filtration \( (M_n)_{n \geq 1} \) is \( \varprojlim \faktor{M}{M_n} \).
    \end{enumerate}
\end{definition}
\begin{theorem}
    Let \( R \) be a Noetherian ring, and let \( \mathfrak a \) be an ideal of \( R \).
    Then,
    \begin{enumerate}
        \item the \( \mathfrak a \)-adic completion \( \hat R \) is Noetherian;
        \item the functor \( \hat R \otimes_R (-) \) is exact;
        \item if \( M \) is a finitely generated \( R \)-module, then the natural map \( \hat R \otimes_R M \to \hat M \) is an \( \hat R \)-linear isomorphism.
    \end{enumerate}
\end{theorem}
Thus \( \mathfrak a \)-adic completion is an exact functor from the category of finitely generated \( R \)-modules if \( R \) is Noetherian.

\subsection{Graded rings and modules}
\begin{definition}
    A \emph{graded ring} is a ring \( A = \bigoplus_{n=0}^\infty A_n \), where each \( A_n \) is an additive subgroup of \( A \), such that \( A_m A_n \subseteq A_{m+n} \).
\end{definition}
\begin{proposition}
    \( A_0 \) is a subring of \( A \).
\end{proposition}
\begin{proof}
    It is clearly a subgroup closed under multiplication, so it suffices to check that it contains the identity element of \( A \).
    We have
    \[ 1_A = \sum_{i=0}^m y_i;\quad y_i \in A_i \]
    For \( z_n \in A_n \),
    \[ z_n = \sum_{i=0}^m y_i z_n \]
    \( z_n \) is an element of \( A_n \), and each term \( y_i z_n \) is an element of \( A_{n+i} \).
    But since the sum is direct, we must have \( z_n = y_0 z_n \), so \( z = y_0 z \) for all \( z \in A \).
    Hence \( y_0 \in A_0 \) is the identity element.
\end{proof}
\begin{remark}
    Each \( A_n \) is an \( A_0 \)-module as \( A_0 A_n \subseteq A_n \).
\end{remark}
\begin{example}
    The polynomial ring in finitely many variables has a grading: \( k[T_1, \dots, T_m] = \bigoplus_{n=0}^\infty A_n \) where \( A_n \) is the set of homogeneous polynomials of degree \( n \).
\end{example}
\begin{definition}
    Let \( A = \bigoplus_{n=0}^\infty A_n \) be a graded ring.
    A \emph{graded \( A \)-module} is an \( A \)-module \( M = \bigoplus_{n=0}^\infty M_n \) such that \( A_m M_n \subseteq M_{m+n} \).
\end{definition}
For a graded ring \( A \), we define \( A_+ = \bigoplus_{n = 1}^\infty A_n = \ker (A \twoheadrightarrow A_0) \).
This is an ideal of \( A \), and \( \faktor{A}{A_+} \simeq A_0 \).
\begin{proposition}
    Let \( A = \bigoplus_{i=0}^\infty A_n \) be a graded ring.
    Then the following are equivalent:
    \begin{enumerate}
        \item \( A \) is Noetherian;
        \item \( A_0 \) is Noetherian and \( A \) is finitely generated as an \( A_0 \)-algebra.
    \end{enumerate}
\end{proposition}
\begin{proof}
    Hilbert's basis theorem shows that (ii) implies (i).
    For the converse, \( A_0 \) is Noetherian as it is isomorphic to a quotient of the Noetherian ring \( A \).
    Note that \( A_+ \) is generated by the set of homogeneous elements of positive degree.
    By (i), \( A_+ \) an ideal in a Noetherian ring so is generated by a finite set \( \qty{x_1, \dots, x_s} \), and we can take each \( x_i \) to be homogeneous, say, \( x_i \in A_{k_i} \) where \( k_i > 0 \).
    Let \( A' \) be the \( A_0 \)-subalgebra of \( A \) generated by \( \qty{x_1, \dots, x_s} \); we want to show \( A' = A \).
    It suffices to show that \( A_n \subseteq A' \) for every \( n \geq 0 \), which we will show by induction.
    The case \( n = 0 \) is clear.

    Let \( n > 0 \), and let \( y \in A_n \).
    Note that \( y \in A_+ \), so
    \[ y = \sum_{i=1}^s r_i x_i \]
    where \( r_i \in A \) and \( x_i \in A_{k_i} \).
    Applying the projection to \( A_n \),
    \[ y = \sum_{i=1}^s a_i x_i;\quad a_i \in A_{n-k_i} \]
    where \( a_i \) is the \( (n-k_i) \) homogeneous part of \( r_i \).
    As \( k_i \) is positive, the inductive hypothesis implies that each \( a_i \) can be written as a polynomial in \( x_1, \dots, x_s \) with coefficients in \( A_0 \), giving \( y \in A' \) as required.
\end{proof}
\begin{definition}
    Let \( \mathfrak a \) be an ideal of \( R \), and let \( M \) be an \( R \)-module.
    Then a filtration \( (M_n)_{n \geq 0} \) is an \emph{\( \mathfrak a \)-filtration} if \( \mathfrak a M_n \subseteq M_{n+1} \) for each \( n \geq 0 \).
    An \( \mathfrak a \)-filtration \( (M_n)_{n \geq 0} \) is \emph{stable} if there exists \( n_0 \geq 0 \) such that \( \mathfrak a M_n = M_{n+1} \) for all \( n \geq n_0 \).
\end{definition}
\begin{example}
    \( (\mathfrak a^n M)_{n \geq 0} \) is a stable \( \mathfrak a \)-filtration of \( M \).
\end{example}
\begin{definition}
    Let \( \mathfrak a \) be an ideal in \( R \).
    The \emph{associated graded ring} is
    \[ G_{\mathfrak a}(R) = \bigoplus_{n \geq 0} \faktor{\mathfrak a^n}{\mathfrak a^{n+1}};\quad \mathfrak a^0 = R \]
    This is a ring by defining
    \[ (x + \mathfrak a^{n+1})(y + \mathfrak a^{m+1}) = xy + \mathfrak a^{n + m + 1};\quad x \in \mathfrak a^n, y \in \mathfrak a^m \]
\end{definition}
\begin{definition}
    Let \( M \) be an \( R \)-module, and let \( \mathfrak a \) be an ideal of \( R \).
    Let \( (M_n)_{n \geq 0} \) be an \( \mathfrak a \)-filtration of \( M \).
    The \emph{associated graded module} is
    \[ G(M) = \bigoplus_{n \geq 0} \faktor{M_n}{M_{n+1}} \]
    This is a module over \( G_{\mathfrak a}(R) \) by defining
    \[ (x + \mathfrak a^{n+1})(m + M_{\ell + 1}) = xm + M_{n+\ell+1} \]
\end{definition}
\begin{proposition}
    Let \( R \) be a Noetherian ring, and let \( \mathfrak a \) be an ideal of \( R \).
    Then
    \begin{enumerate}
        \item the associated graded ring \( G_{\mathfrak a}(R) \) is Noetherian; and
        \item if \( M \) is a finitely generated \( R \)-module and \( (M_n)_{n \geq 0} \) is a stable \( \mathfrak a \)-filtration of \( M \), then the associated graded module \( G(M) \) is a finitely generated \( G_{\mathfrak a}(R) \)-module.
    \end{enumerate}
\end{proposition}
\begin{proof}
    \emph{Part (i).}
    Let \( R \) be Noetherian.
    Then let \( \mathfrak a = (x_1, \dots, x_s) \), and write \( \overline x_i \) for the image of \( x_i \) in \( \faktor{\mathfrak a}{\mathfrak a^2} \).
    Note that
    \[ G_{\mathfrak a}(R) = \faktor{R}{\mathfrak a} \oplus \faktor{\mathfrak a}{\mathfrak a^2} \oplus \faktor{\mathfrak a^2}{\mathfrak a^3} \oplus \cdots \]
    \( G_{\mathfrak a}(R) \) is generated as an \( \faktor{R}{\mathfrak a} \)-algebra by \( \overline x_1, \dots, \overline x_s \), by taking sums and products.
    Note that \( \faktor{R}{\mathfrak a} \) is Noetherian, so \( G_{\mathfrak a}(R) \) is Noetherian by Hilbert's basis theorem.

    \emph{Part (ii).}
    Let \( (M_n)_{n \geq 0} \) be a stable \( \mathfrak a \)-filtration of \( M \).
    Then there exists \( n_0 \) such that for all \( n \geq n_0 \), we have \( M_{n_0 + r} = \mathfrak a^r M_{n_0} \).
    Thus \( G(M) \) is generated as a \( G_{\mathfrak a}(R) \)-module by
    \[ \faktor{M_0}{M_1} \oplus \faktor{M_1}{M_2} \oplus \dots \oplus \faktor{M_{n_0}}{M_{n_0 + 1}} \]
    Each factor \( \faktor{M_i}{M_{i+1}} \) is a Noetherian \( R \)-module, as they are quotients of Noetherian modules, and are annihilated by \( \mathfrak a \).
    In particular, \( G(M) \) is a finitely generated \( G_{\mathfrak a}(R) \)-module, say by \( x_1, \dots, x_s \).
\end{proof}
\begin{definition}
    Let \( M \) be an \( R \)-module.
    We say that filtrations \( (M_n), (M_n') \) of \( M \) are \emph{equivalent} if there exists \( n_0 \) such that for all \( n \geq 0 \), we have \( M_{n + n_0} \subseteq M_n' \) and \( M'_{n + n_0} \subseteq M_n \).
\end{definition}
\begin{lemma}
    Let \( \mathfrak a \) be an ideal of \( R \).
    Let \( M \) be an \( R \)-module, and let \( (M_n)_{n \geq 0} \) be a stable \( \mathfrak a \)-filtration of \( M \).
    Then \( (M_n)_{n \geq 0} \) is equivalent to \( (\mathfrak a^n M)_{n \geq 0} \).
\end{lemma}
\begin{proof}
    As \( (M_n)_{n \geq 0} \) is an \( \mathfrak a \)-filtration, for all \( n \geq 0 \), we have
    \[ M_n \supseteq \mathfrak a M_{n-1} \supseteq \mathfrak a^2 M_{n-2} \supseteq \dots \supseteq \mathfrak a^n M \supseteq \mathfrak a^{n + n_0} M \]
    For the other direction, as the filtration is stable, there exists \( n_0 \) such that for each \( n \geq n_0 \), we have \( \mathfrak a M_n = M_{n+1} \).
    Then \( M_{m + n_0} = \mathfrak a^n M_{n_0} \subseteq \mathfrak a^n M \) as required.
\end{proof}

\subsection{Artin--Rees lemma}
\begin{definition}
    Let \( \mathfrak a \) be an ideal of \( R \).
    Let \( M \) be an \( R \)-module, and let \( (M_n)_{n \geq 0} \) be an \( \mathfrak a \)-filtration of \( M \).
    Then we define
    \[ R^\star = \bigoplus_{n \geq 0} \mathfrak a^n;\quad M^\star = \bigoplus_{n \geq 0} M_n \]
\end{definition}
Note that \( R^\star \) is a graded ring, as for \( x \in \mathfrak a^n, y \in \mathfrak a^\ell \), we have \( xy \in \mathfrak a^{n + \ell} \).
As \( (M_n)_{n \geq 0} \) is an \( \mathfrak a \)-filtration, \( M^\star \) is a graded \( R^\star \)-module.
Indeed, for \( x \in \mathfrak a^n \) and \( m \in M_\ell \), we have \( xm \in M_{n + \ell} \) as required.

If \( R \) is Noetherian, the ideal \( \mathfrak a \) is finitely generated, say by \( x_1, \dots, x_r \).
Then \( R^\star \) is generated as an \( R \)-algebra by \( x_1, \dots, x_r \) by taking sums and products.
By Hilbert's basis theorem, \( R^\star \) is a Noetherian ring.
\begin{lemma}
    Let \( R \) be a Noetherian ring, and let \( \mathfrak a \) be an ideal of \( R \).
    Let \( M \) be a finitely generated \( R \)-module, and let \( (M_n)_{n \geq 0} \) be an \( \mathfrak a \)-filtration of \( M \).
    Then, the following are equivalent:
    \begin{enumerate}
        \item \( M^\star \) is finitely generated as an \( R^\star \)-module;
        \item the \( \mathfrak a \)-filtration \( (M_n)_{n \geq 0} \) is stable.
    \end{enumerate}
\end{lemma}
\begin{proof}
    First, note that each \( M_n \) is a finitely generated \( R \)-module.
    Indeed, \( R \) is a Noetherian ring and \( M \) is finitely generated, so \( M \) is a Noetherian module, or equivalently, every submodule is finitely generated.
    Now, consider
    \[ M^\star_n = M_0 \oplus \dots \oplus M_n \oplus \mathfrak a M_n \oplus \mathfrak a^2 M_n \oplus \cdots \]
    This is an \( R^\star \)-submodule of \( M^\star \).
    Note that \( (M^\star_n)_{n \geq 0} \) is an ascending chain of \( R^\star \)-submodules of \( M^\star \), and this chain stabilises if and only if the \( \mathfrak a \)-filtration \( (M_n)_{n \geq 0} \) is stable.

    \emph{(i) implies (ii).}
    As \( R \) is Noetherian, so is \( R^\star \) by the discussion above.
    By assumption, \( M^\star \) is finitely generated as a module over a Noetherian ring, so it is Noetherian.
    Hence the ascending chain \( (M^\star_n)_{n \geq 0} \) stabilises, giving the result.

    \emph{(ii) implies (i).}
    Suppose \( (M_n)_{n \geq 0} \) is stable.
    Then \( (M^\star_n)_{n \geq 0} \) stabilises at some \( n_0 \geq 0 \), so
    \[ M^\star = \bigcup_{n \geq 0} M_n^\star = M_{n_0}^\star \]
    Now, note that \( M_0 \oplus \dots \oplus M_{n_0} \)
    generatees \( M^\star_{n_0} \) as an \( R^\star \)-module.
    Each \( M_n \) is a finitely generated \( R \)-module, so \( M_0 \oplus \dots \oplus M_{n_0} \) is also finitely generated as an \( R \)-module.
    So these generators span \( M^\star_{n_0} = M^\star \) as an \( R^\star \)-module, as required.
\end{proof}
\begin{proposition}[Artin--Rees]
    Let \( R \) be a Noetherian ring, and let \( \mathfrak a \) be an ideal of \( R \).
    Let \( M \) be a finitely generated \( R \)-module, and let \( (M_n)_{n \geq 0} \) be a stable \( \mathfrak a \)-filtration of \( M \).
    Then for any submodule \( N \leq M \), \( (N \cap M_n)_{n \geq 0} \) is a stable \( \mathfrak a \)-filtration of \( N \).
\end{proposition}
Thus, stable filtrations pass to submodules.
\begin{proof}
    First, we show that \( (N \cap M_n)_{n \geq 0} \) is indeed an \( \mathfrak a \)-filtration.
    \[ \mathfrak a(N \cap M_n) \subseteq N \cap \mathfrak a M_n \subseteq N \cap M_{n + 1} \]
    Now, define
    \[ M^\star = \bigoplus_{n \geq 0} M_n;\quad N^\star = \bigoplus_{n \geq 0} (N \cap M_n) \]
    Note that \( M^\star \) is an \( R^\star \)-submodule of \( N^\star \).
    As \( R \) is Noetherian, so is \( R^\star \).
    Then as \( (M_n)_{n \geq 0} \) is stable, \( M^\star \) is a finitely generated \( R^\star \)-module by the previous lemma.
    Thus \( M^\star \) is a Noetherian \( R^\star \)-module.
    Its submodule \( N^\star \) is then finitely generated, so \( (N \cap M_n)_{n \geq 0} \) is stable.
\end{proof}
